#ifndef _TABULEIRO_H
#define _TABULEIRO_H


#include <vector>
#include "Casa.h"
#include "Peca.h"

using namespace std;

class Tabuleiro : public CGFobject
{
private:
	int dimensao;
	vector<vector<Casa> > Matrix;
	vector<vector<vector<Peca> > > pecas;
	CGFappearance* base;
	CGFtexture* textura;
	Fundo* fun;
	vector<string> texturas;
	unsigned int ti;
public:
	Tabuleiro();
	void initTabuleiro();
	void initTexturas();
	void setTextura(int tex);
	void setNextTexture();
	vector<Peca> getCasa(int x, int y);
	void setCasa(int x, int y, vector<Peca> p);
	void clearCasa(int x, int y);
	void increaseCasa(int x, int y, int color);
	void decreaseCasa(int x, int y);
	Peca getTopPeca(int x, int y);
	bool isOwner(int x, int y, int player);
	bool isKing(int x, int y);
	bool hasKings(int player);
	void selectCasa(int x,int y);
	void deselectCasas();
	void draw();
};

#endif